package design_patterns.proxy.entity;

import design_patterns.proxy.Image;

/**
 * @author chengz
 * @description description
 * @create 2020-08-18 10:03
 */
public class RealImage implements Image {
    private String fileName;

    public RealImage(String fileName) {
        this.fileName = fileName;
        loadFromDisk(fileName);
    }

    private void loadFromDisk(String fileName) {
        System.out.println("loading "+fileName);
    }


    @Override
    public void display() {
        System.out.println("Displaying " + fileName);
    }
}
